<?php

namespace Addons\FakeShare\Controller;
use Home\Controller\AddonsController;
// use Addons\FakeShare\Controller\WxController;

class FakeShareController extends AddonsController {

    public function index() {
        $app_info = get_token_appinfo(I('token'));
        $jssdk = new WxController($app_info['appid'], $app_info['secret']);
        $config = get_addon_config('FakeShare');

        $this->assign ('signPackage', $jssdk->getSignPackage());
        $this->assign('url', $config['url']);
        $this->assign('img', $config['img']);
        $this->assign('title', $config['title']);
        $this->assign('content', $config['content']);
        $this->display();
    }
}
